﻿using System;
using System.Reflection;
using System.Windows.Forms;
using Finance.Properties;

namespace Finance.Views
{
	public partial class AboutControl : UserControl
	{
		public AboutControl()
		{
			InitializeComponent();

			var productAttribute = (AssemblyProductAttribute)
				Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyProductAttribute));

			_appNameLabel.Text = productAttribute.Product;
			_labelVersion.Text = string.Format(Resources.AboutControl_VersionFormat, Assembly.GetExecutingAssembly().GetName().Version);
			_descriptionLabel.Text = Resources.AboutControl_Description;
		}

		private void OnLinkLabelClick(object sender, EventArgs e)
		{
			System.Diagnostics.Process.Start("http://todosoft.org/products/microfinance",""); 
		}
	}
}
